/**
 * config
 * Created by zhaijg.
 */
var app =  
angular.module('app')
  .config(
    [        '$controllerProvider', '$compileProvider', '$filterProvider', '$provide','token',
    function ($controllerProvider,   $compileProvider,   $filterProvider,   $provide,token) {

        // lazy controller, directive and service
        app.controller = $controllerProvider.register;
        app.directive  = $compileProvider.directive;
        app.filter     = $filterProvider.register;
        app.factory    = $provide.factory;
        app.service    = $provide.service;
        app.constant   = $provide.constant;
        app.value      = $provide.value;
        app.token = token;
        app.isErrorSend = true;
        app.userCallBackUrl = "http://m.51ficc.com/user/recall/wxaa08dedd6d97a5ae/";
    }
  ])
  .config(['$translateProvider', function($translateProvider){
    // Register a loader for the static files
    // So, the module will search missing translation tables under the specified urls.
    // Those urls are [prefix][langKey][suffix].
    $translateProvider.useStaticFilesLoader({
      prefix: 'l10n/',
      suffix: '.js'
    });
    // Tell the module what language to use by default
    $translateProvider.preferredLanguage('cn');
    // Tell the module to store the language in the local storage
    $translateProvider.useLocalStorage();
  }])
    //拦截器
    .config(['$httpProvider', function($httpProvider){
        $httpProvider.interceptors.push('authenFactory');
    }])
    //默认toke
    .constant("token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE0NDgzNTY1MDh9.4pApg2Upmh5JjsKfc96kbjhlgMelTi8YbQb_eFdj68M=")
    //api地址
    .constant("apiUrl", "https://api.51ficc.com/cms")
    //.constant("apiUrl", "https://test.51ficc.com/cms/test")
    //.constant("apiUrl", "https://test.51ficc.com/cms/dev")
